<template>
  <div class="demo">
    <h2>学校名称:{{ schoolName }}</h2>
    <h2>学校地址:{{ schoolAddress }}</h2>
    <button @click="showName">点我提示学校名</button>
  </div>
</template>

<script>
// 默认暴漏 简写
export default {
  name: 'SchoolInfo',
  data() {
    return {
      schoolName: '宋营小学',
      schoolAddress: "河南省商丘市睢阳区路河乡",
    };
  },
  methods: {
    showName() {
      alert(this.schoolName);
    }
  },
}
</script>

<style>
    .demo{
        background-color: orange;
    }
</style>
